//
//  Tool.h
//  tangkerU
//
//  Created by yanzhen on 14-5-1.
//  Copyright (c) 2014年 yanzhen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MBProgressHUD.h"
#import "AFAppClient.h"
#import <MapKit/MapKit.h>
@interface Tool : NSObject

+ (void)showHUD:(NSString *)text andView:(UIView *)view andHUD:(MBProgressHUD *)hud;
+ (NSString*) appendString:(NSString*) str1 with:(NSString*) str2;
+ (void)setCenterViewController : (UIViewController*) view withName : (NSString*) name andBundle:(NSString*)bundle;
+ (void)ToastNotification:(NSString *)text andView:(UIView *)view andLoading:(BOOL)isLoading andIsBottom:(BOOL)isBottom;
+ (NSString*) getOSVersion;
+ (NSString*) defaultStringFromDic:(NSDictionary*)dic withKey : (NSString*) key;
+ (NSInteger) defaultIntFromDic:(NSDictionary*)dic withKey: (NSString*)key;
+ (void)closeAlert:(NSTimer*)timer;
+(NSString *)getAnimal:(NSInteger) animal;
+(NSString *)getSex:(NSInteger) sex;
+(NSString *)getMarry:(NSInteger) marry;
+(NSString *)getConstellatory :(NSInteger)constellatory;
+(void)setLayerView:(UIImageView *) photo_img;
+(void) setLayerView:(UIImageView *) photo_img andBound:(CGRect)bounds;
+(void)showSystemAlert:(NSString *)title andMsg:(NSString *)msg;
+(void)reSetInfo;
+(void)reSetInfoWith:(NSUInteger)uid;
+(NSDictionary*)getInfoById:(NSString *)uid;
+(NSString *)dateFormat:(NSDate*)date;
+(NSString *)dateLocalPrint:(NSString *)sendTime;
+(void)showToolsGif:(NSInteger)tid in:(UIView*)view;
+(void)playAnimation:(NSString *)imageName In:(UIView*)view andNumber:(NSUInteger)total;
+ (BOOL)isMobileNumber:(NSString *)mobileNum;
+(BOOL)checkAuth;
+(BOOL)checkVip;
+(NSDictionary*)getMyInfo;
+(NSDictionary*)getInfoWith:(NSUInteger)uid;
+(NSString*)formatGold:(NSUInteger)gold;
+(NSString *)getTags:(NSString*)tags withSex:(NSUInteger)sex;
+(UIViewController*)getViewController:(NSString *)identify withBund:(NSString*)bundle;
+(CLLocationCoordinate2D)transform:(CLLocationCoordinate2D)origin;
+(double)transformLat:(double)x:(double) y;
+(double)transformLon:(double)x:(double)y;
+ (UIImage *)convertImageToGrayScale:(UIImage *)image;
+(NSUInteger)canShaking;


+ (NSString*) stringFromFomate:(NSDate*)date formate:(NSString*)formate;
+ (NSString *)intervalSinceNow: (NSString *) theDate;
+ (void)writeDictToPlist:(NSString *)plist dict:(NSDictionary *)dict;
+ (NSString *)today;
+ (NSString *)nowDate;
+ (NSString *)timeToStamp:(NSString *)timeStr;
+ (UIImage *)getImageBySrc:(id)imgSrc;

/**
 *  当前时间的时间戳
 *
 */
+ (NSString *)timeStamp;

/**
 *  当前时间 yyyy-MM-dd HH:mm:ss
 *
 */
+ (NSString *)fullDate;

// 2014:11:28 16:52:42 => 2014:11:28
+ (NSString *)dateCutHour:(NSString *)time;

+ (NSMutableDictionary *)readFromePath:(NSString *)paths;
+ (NSMutableArray *)readArrayFromePath:(NSString *)paths;
+ (void)writeArrayToPlist:(NSString *)plist array:(NSMutableArray *)array;
+(BOOL)isValidateEmail:(NSString *)email;
+(double) MachTimeToSecs:(uint64_t)time;
@end
